package com.shaokel.eduservice.client;

import com.shaokel.commonutils.ReturnResult;
import com.shaokel.eduservice.client.impl.VodClientImpl;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author 少丶客
 * @ClassName VodClient
 * @Description 服务调用
 * @Date 2020/6/12 11:21
 * @Vesion 1.0
 */
@FeignClient(name = "service-vod",fallback = VodClientImpl.class)   //调用的服务名称
@Component
public interface VodClient {

    //根据id删除视频
    @GetMapping("/eduvod/video/removeAlyiVideo/{id}")
    public ReturnResult removeAlyiVideo(@PathVariable("id") String id);

    //批量删除视频
    @DeleteMapping("/eduvod/video/deleteBatch")
    public ReturnResult deleteBatch(@RequestParam("videoIdList") List<String> videoIdList);

}